package org.extreme.model.data.stream;

import org.extreme.commons.XRException;
import org.extreme.model.data.DataField;

public interface DataStream {
	/**
	 * Tries to position the cursor on the next element in the data source.
	 * @return true if there is a next record, false otherwise
	 * @throws XRException if any error occurs while trying to move to the next element
	 */
	public boolean next() throws XRException;

	/**
	 * Gets the field value for the current position.
	 * @return an object containing the field value. The object type must be the field object type.
	 */
	public Object getFieldValue(DataField dataField) throws XRException;
}
